package com.bw.home.service

import com.bw.home.api.SimpleVideoApi
import com.bw.home.entity.SimpleVideoEntity
import com.bw.lib_net.BaseRes
import com.bw.lib_net.RetrofitFactory

class SimpleVideoService {

    private val api: SimpleVideoApi

    //初始化
    init {
        api = RetrofitFactory.getRetrofit().create(SimpleVideoApi::class.java)
    }

    suspend fun getSimpleVideo(
        channelId: String,
        page: Int,
        pageSize: Int
    ): BaseRes<List<SimpleVideoEntity>> {
        return api.getSimpleVideo(channelId, page, pageSize)
    }

    suspend fun getRecommendVideo(
        page: Int,
        pageSize: Int
    ): BaseRes<List<SimpleVideoEntity>> {
        return api.getRecommendVideo(page, pageSize)
    }
}